<% if domainname != "undef" -%>
domain <%= domainname %>
<% end -%>
<% if searchpath != "undef" -%>
search <%= searchpath.join(" ") %>
<% end -%>
<% if nameservers != "undef" -%>
<% nameservers.each do |ns| %>nameserver <%= ns %>
<% end -%>
<% end -%>
